package com.xuenci.gulimall.auth.config;/*
 *@author:xec
 *@date:2022/5/20  19:29
 */

import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@Controller
public class GulimallWebConfig implements WebMvcConfigurer {

    /**
     * 视图映射
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        /**
         *      @GetMapping("/login.html")
         *      public String loginPage(){
         *          System.out.println("aa");
         *          return "login";
         *      }
         */
//        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/reg.html").setViewName("reg");
    }
}
